package com.sl.water.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sl.water.dao.PlanEAzqDao;
import com.sl.water.entity.PlanDynamic;
import com.sl.water.entity.PlanEAzq;
import com.sl.water.service.PlanEAzqService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: duan
 * @time: 2025-06-30 14:27
 */
@Service
@RequiredArgsConstructor
public class PlanEAzqServiceImpl extends ServiceImpl<PlanEAzqDao, PlanEAzq> implements PlanEAzqService {
    @Override
    public Page<PlanEAzq> pageList(int page, int size) {
        return null;
    }

    @Override
    public String getGeoJson(String name) {
        LambdaQueryWrapper<PlanEAzq> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(PlanEAzq::getName, name);
        PlanEAzq bean = this.getOne(lambdaQueryWrapper);
        if (bean == null) {
            throw new RuntimeException("安置区不存在");
        }
        return bean.getCoords();
    }
}
